#ifndef PYHP_MODULE
#define PYHP_MODULE

#include <Python.h>
#include <httpd.h>

/* Py_ssize_t is a typedef, not a define and should exists.
 * defining it < pointer size would break pyhp on every 64bit system
#ifndef Py_ssize_t
#define Py_ssize_t int
#endif
*/

typedef struct pyhp_data {
    PyObject * pyhp_layer;
    PyObject * pyhp_globals;
    PyThreadState * interpreter;

    PyObject * sys_module;
    PyObject * pickle_module;
} PyHPData;

int PyHP_RunPython(PyHPData * pydata, request_rec *r, char const * code);

void pyhp_pydict_add_string(PyObject * d, const char * key, const char * val);

#endif
